<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"   
      xmlns:jb="http://java.sun.com/jsf/composite/componentes"
      xmlns:p="http://primefaces.org/ui">

    <SCRIPT language="JavaScript" type="text/javascript">
                   
        function handleRequest(xhr, status, args) {                     
            if(args.validationFailed || !args.CallbackParam) {  
     
            } else {                              
                carDialogAccion.hide();  
                jQuery('#btnGuardarDetalle').fadeOut();  
            }  
        }  
    </SCRIPT>
    <h:form onsubmit="return checkSubmit();"  id="frmAccion">
        <h:panelGrid id="pgFormDtoAccion">
            <h:panelGrid  columns="4" cellpadding="4">

                <h:outputLabel value="#{i18n['cobranza.telefono']}" styleClass="label"/>
                <h:outputText value="#{cobranzaMBean.dtoComunica.telefono}" styleClass="general"/>

                <h:outputLabel for="itParentezcoPopupAccion" styleClass="label" value="#{i18n['cobranza.parentezco.contacto']}"/>
                <p:selectOneMenu id="itParentezcoPopupAccion" value="#{cobranzaMBean.dtoComunica.parentezcoContactoDto}"  converter="parametroConvert"                               
                                 style="#{applicationMBean.estiloObligatorio}" required="true">
                    <f:selectItems value="#{cobranzaMBean.listaParentezco}" var="parametroDto"  itemLabel="#{parametroDto.descripcion}" itemValue="#{parametroDto}" />                        
                </p:selectOneMenu>

                <h:outputLabel value="#{i18n['cobranza.contacto']}" styleClass="label"/>
                <p:inputText id="itContactoPopupAccion" label="#{i18n['cobranza.contacto']}"
                             value="#{cobranzaMBean.dtoComunica.contacto}"
                             required="true" size="60" styleClass="txtCampoObligatorio">
                    <f:validateLength maximum="100" minimum="1"/>
                </p:inputText>

                <h:outputLabel value="#{i18n['cobranza.efecto']}" styleClass="label"/>
                <p:selectOneMenu id="itEfectoPopupAccion" value="#{cobranzaMBean.dtoComunica.efectoDto}"  converter="parametroConvert"                               
                                 style="#{applicationMBean.estiloObligatorio}" required="true">
                    <f:selectItems value="#{cobranzaMBean.listaEfecto}" var="parametroDto"  itemLabel="#{parametroDto.descripcion}" itemValue="#{parametroDto}" />                        
                </p:selectOneMenu>

                <h:outputLabel value="#{i18n['cobranza.comentarios']}" styleClass="label"/>
                <p:inputTextarea label="#{i18n['cobranza.comentarios']}"
                                 value="#{cobranzaMBean.dtoComunica.comentarios}"
                                 onkeypress="return fn_validaTecla('alfanumericoypuntoyblanco',this)"
                                 style="#{applicationMBean.estiloObligatorio}"
                                 rows="3" cols="80">
                    <f:validateLength maximum="1000" minimum="0" />
                </p:inputTextarea>
            </h:panelGrid>

            <p:panel id="pnlAcciones">
                <h:panelGrid columns="10">
                    <p:commandButton id="btnGuardarDetalle" update=":frmPrincipal, :frmGestionCobranza, :msjDialogDeta" 
                                     title="#{i18n['general.button.guardar.tip']}"
                                     style="#{applicationMBean.estilosBtnGuardar}"
                                     ajax="true"
                                     icon="ui-icon ui-icon-disk"
                                     value="#{i18n['general.button.guardar']}" 
                                     action="#{cobranzaMBean.guardarAccion}"
                                     oncomplete="handleRequest(xhr, status, args);"
                                     >
                    </p:commandButton>
                </h:panelGrid>
            </p:panel>
        </h:panelGrid>  
    </h:form>
</html>